Repository navigation
fix(aggregator): saas-extract export overlays refuse impossible/non-ISO dates - #5024
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 31 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. CodeRabbit Verify
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Codex disposition (queue task 8497): the Codex review run on commit 2328bf1 failed to execute — "You have reached your Codex usage limits for code reviews" (chatgpt-codex-connector[bot]). There are no inline Codex findings and no Codex review bodies on this PR to disposition (verified: 0 inline review comments, 0 reviews); the |
Fixes #5018 (queue task 8497).
Problem
applyCloudflareExportandapplySupabaseExportinpm-stack/aggregator/src/saas-extract.tsgated freshness onDate.parseonly.Date.parserolls impossible dates over (2026-02-30→ Mar 2) and accepts non-ISO strings, so a drifted export stamp could pass the freshness window, win the overlay, and stamp a nonexistent measured date onto the card; an impossible CloudflarecycleStartlikewise rolled into the current month and evaded the same-month check.Change
measuredAt, CloudflarecycleStart, and SupabasemeasuredAtgates now parse with the sharedparseIsoDatefromvalidate.ts(already imported in this file) — the same real-calendar rule the file's other date paths use (aggregator(snapshot-records): shape-only dates win freshestDate — a 2026-13-01 'Last checked' silently drops a pool's snapshot history, 2026-02-30 is stored as a phantom March date #2264). A non-ISO or impossible date/time returns the services untouched (prose fallback), exactly like a stale or unparseable document.toISOString()stamps and date-only forms parse to the same instants as before.Tests
New cases in
pm-stack/aggregator/test/cloudflare-export.test.tsandpm-stack/aggregator/test/supabase-export.test.ts:measuredAt(2026-02-30,2026-04-31) and non-ISO (March 2, 2026 12:00 UTC) refused on both overlays, at anowwhere theDate.parserollover would have passed freshness;cycleStart(2026-02-30) refused instead of rolling into the current month;2024-02-29T12:00:00.000Z) still overlays on both.Laptop:
bun test test/cloudflare-export.test.ts test/supabase-export.test.ts— 26 pass, 0 fail (21 existing + 5 new).Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.